<?
	include '../model/database.php';
	include '../model/xl_dia_diem.php';
	include '../model/xl_hinh_anh_dia_diem.php';
	
	$xl_hinh_anh = new xl_hinh_anh_dia_diem();
	$xl_dia_diem = new xl_dia_diem();
	

	
	$l = $_REQUEST['list'];
	foreach($l as $r){
		$arr = $xl_dia_diem->diaDiem($r);
		$diadiem = $arr[0];
		$arrpic = $xl_hinh_anh->hinhAnhDiaDiem($diadiem['MaDiaDiem']);
		$pic = $arrpic[0];
?>
<li id="<?=$diadiem['MaDiaDiem']?>" onclick="LightOn(this)" >
    <div class="item_perpage" onclick="HightLightMarker('<?=$diadiem['MaDiaDiem']?>');" style="float: left; width: 100%;cursor: pointer; height: 90.5px;">
        <div style="float: left; margin-right: 5px;">
            <div style="float: left; margin-right: 5px;">
                <img width="50px" height="50px" style=" padding:2px; border: 1px solid #DFDFDF;border-radius: 3px 3px 3px 3px;-webkit-border-radius: 3px 3px 3px 3px;-moz-border-radius: 3px 3px 3px 3px;" alt="avatar" onerror="imgError(this,3 )" title="Hình ảnh đại diện của bạn." src="uploads/place/<? if($pic['DuongDan']!=""){ echo $pic['DuongDan'];}else{?>photo_not_available.png<? } ?>">
            </div>
            
        </div>
        
        <div class="nd_leftbd" style="width: 210px;">
            <span class="textTitle" title="<?=$diadiem['TenDiaDiem']?>">
                <b><?=$diadiem['TenDiaDiem']?></b>
            </span>
            <div class="tieude_bd">
                <?=$diadiem['DiaChi']?>
                <div class="infosub">
                    Ngày đăng: <span class="textTitle"><?=date("d/m/Y",strtotime($diadiem['ThoiGianTao']))?></span>
                </div>
            </div>
        </div>  
    </div>
</li>
<?
	}
?>